export default {
  //获取单页面列表
  loadPageList(params,callback){
    Vue.http.get('/single/page/list.json',{ params: params }).then(function (response) {
      callback(response.data);
    })
  },
  //获取详情
  loadPageDetail(params,callback){
    Vue.http.get('/single/page/detail.json',{params: params}).then(function (response) {
      callback(response.data);
    })
  },
  //一系列操作单页面（上架，下架，删除，预览）
  operatePage(params, callback_success, callback_error){
    Vue.http.put('/single/page/handle.json',params).then(response=>{
      callback_success(response.data);
    },response=>{
      callback_error(response.data)
    })
  },
  // 新增和编辑单页面
  editPageServer(params, callback_success, callback_error) {
    Vue.http.post('/single/page/add.json', params).then(response => {
      callback_success(response.data);
    }, response => {
      callback_error(response.data)
    });
  },
}
